01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: *
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: /**
20: * @author Mikhail A. Markov
21: * @version $Revision: 1.1.2.2 $
22: */package org.apache.harmony.rmi.remoteref;
23:
24: import java.io.ObjectOutput;
25: import java.rmi.server.ObjID;
26: import java.rmi.server.RMIClientSocketFactory;
27: import java.rmi.server.RMIServerSocketFactory;
28:
29: /**
30: * Implementation of server-side handle for remote objects using custom
31: * socket factories.
32: *
33: * @author Mikhail A. Markov
34: * @version $Revision: 1.1.2.2 $
35: */
36: public class UnicastServerRef2 extends UnicastServerRef {
37:
38: private static final long serialVersionUID = -3460099617464801595L;
39:
40: /**
41: * Constructs default UnicastServerRef2 listening on anonymous port and
42: * using default client and server socket factories.
43: */
44: public UnicastServerRef2() {
45: super ();
46: }
47:
48: /**
49: * Constructs UnicastServerRef2 listening on the port specified and
50: * having the given client and server socket factories.
51: *
52: * @param port port where this UnicastServerRef2 will listen for connections
53: * @param csf client-side socket factory for creating client sockets
54: * @param ssf server-side socket factory for creating server sockets
55: */
56: public UnicastServerRef2(int port, RMIClientSocketFactory csf,
57: RMIServerSocketFactory ssf) {
58: this (port, csf, ssf, new ObjID());
59: }
60:
61: /**
62: * Constructs UnicastServerRef2 listening on the port specified,
63: * using specified client and server socket factories and
64: * having the given ObjID.
65: *
66: * @param port port where this UnicastServerRef2 will listen for connections
67: * @param csf client-side socket factory for creating client sockets
68: * @param ssf server-side socket factory for creating server sockets
69: * @param objId Object ID of remote object
70: */
71: public UnicastServerRef2(int port, RMIClientSocketFactory csf,
72: RMIServerSocketFactory ssf, ObjID objId) {
73: super (port, csf, ssf, objId);
74: }
75:
76: /**
77: * @see RemoteRef.getRefClass(ObjectOutput)
78: */
79: public String getRefClass(ObjectOutput out) {
80: return "UnicastServerRef2"; //$NON-NLS-1$
81: }
82: }
|