3ea135bb |
1 | /**\r |
2 | * Copyright (C) 2003 <a href="http://www.lohndirekt.de/">lohndirekt.de</a>\r |
3 | *\r |
4 | * This library is free software; you can redistribute it and/or\r |
5 | * modify it under the terms of the GNU Lesser General Public\r |
6 | * License as published by the Free Software Foundation; either\r |
7 | * version 2.1 of the License, or (at your option) any later version.\r |
8 | * \r |
9 | * This library is distributed in the hope that it will be useful,\r |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of\r |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r |
12 | * Lesser General Public License for more details.\r |
13 | * \r |
14 | * You should have received a copy of the GNU Lesser General Public\r |
15 | * License along with this library; if not, write to the Free Software\r |
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r |
17 | * \r |
18 | */\r |
19 | package de.lohndirekt.print;\r |
20 | \r |
21 | import java.net.URI;\r |
22 | import java.net.URISyntaxException;\r |
23 | \r |
24 | import javax.print.PrintService;\r |
25 | \r |
26 | import de.lohndirekt.print.IppPrintServiceLookup;\r |
27 | \r |
28 | /**\r |
29 | * @author sefftinge\r |
30 | *\r |
31 | */\r |
32 | public class TestJarLookup {\r |
33 | \r |
34 | public static void main(String[] args) throws URISyntaxException {\r |
35 | System.getProperties().setProperty("de.lohndirekt.print.IppPrintService.uri", "192.168.0.60:631");\r |
36 | testServices();\r |
37 | }\r |
38 | \r |
39 | private static void testServices() throws URISyntaxException {\r |
40 | PrintService[] services = new IppPrintServiceLookup(new URI("ipp://192.168.0.60:631"),"username","password").getPrintServices();\r |
41 | for (int i = 0; i < services.length; i++) {\r |
42 | PrintService service = services[i];\r |
43 | System.out.println(service.getName());\r |
44 | }\r |
45 | }\r |
46 | }\r |