KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > server > ss > ASSocketServiceProxy


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.server.ss;
25
26 import java.io.IOException JavaDoc;
27 import java.net.ServerSocket JavaDoc;
28 import java.net.Socket JavaDoc;
29 import java.nio.channels.ServerSocketChannel JavaDoc;
30 import java.nio.channels.SocketChannel JavaDoc;
31 import com.sun.enterprise.server.ss.spi.ASSocketServiceFacade;
32
33 /**
34  * A Proxy that delegates to the actual ASSocketService class. This facade
35  * is introduced to separate the implementation and interfaces of the
36  * Quickstartup/ASLazyKernel related classes
37  * In the new classloader scheme, the actual implementation
38  * of the ASLazyKernel would lie in appserv-rt.jar, and the SystemClasspath
39  * would have the interfaces classes alone. [NIO specific AS-implementation interfaces
40  * would need to be in the system classpath as J2SE' NIO implmentation requires
41  * them to be there]
42  * Classes under the following packages are now placed under appserv-launch.jar
43  * com.sun.enterprise.server.ss.provider
44  * com.sun.enterprise.server.ss.util
45  * com.sun.enterprise.server.ss.spi
46  *
47  * @author Sivakumar Thyagarajan, Binod PG
48  */

49 public class ASSocketServiceProxy implements ASSocketServiceFacade{
50
51     public void clientSocketConnected(Socket JavaDoc s) {
52         ASSocketService.clientSocketConnected(s);
53     }
54
55     public boolean isServerStartingUp(int port) {
56         return ASSocketService.isServerStartingUp(port);
57     }
58
59     public boolean close(int port, ServerSocket JavaDoc sock, ServerSocketChannel JavaDoc channel) throws IOException JavaDoc {
60         return ASSocketService.close(port, sock, channel);
61     }
62
63     public void waitOnAccept(Socket JavaDoc s) {
64         ASSocketService.waitOnAccept(s);
65     }
66
67     public boolean isLocalClient(Socket JavaDoc s) {
68         return ASSocketService.isLocalClient(s);
69     }
70
71     public boolean exists(int port) {
72         return ASSocketService.exists(port);
73     }
74
75     public void removeListeningSelector(int port) {
76         ASSocketService.removeListeningSelector(port);
77     }
78
79     public void waitOnAccept(SocketChannel JavaDoc sc) {
80         ASSocketService.waitOnAccept(sc);
81     }
82
83     public ServerSocketChannel JavaDoc getServerSocketChannel(int port) {
84         return ASSocketService.getServerSocketChannel(port);
85     }
86
87     public ServerSocket JavaDoc getServerSocket(int port) {
88         return ASSocketService.getServerSocket(port);
89     }
90
91     public boolean socketServiceNotified(int port) {
92         return ASSocketService.socketServiceNotified(port);
93     }
94
95     public void waitOnClientConnection(Socket JavaDoc s) {
96         ASSocketService.waitOnClientConnection(s);
97     }
98     
99 }
100
Popular Tags