Class semper.comm.ComPointHTTP
All Packages Class Hierarchy This Package Previous Next Index
Class semper.comm.ComPointHTTP
java.lang.Object
|
+----semper.comm.ComPointTCP
|
+----semper.comm.ComPointHTTP
- public class ComPointHTTP
- extends ComPointTCP
This class implements the ComPoint class based on http.
- Version:
- beta-4, 12.8.96
- Author:
- Mehdi Nassehi
-
ComPointHTTP()
- Creats a ComPointHTTP.
-
ComPointHTTP(int, ComPointAddress)
- Creats an initiator or server ComPointHTTP.
-
accept()
- Waits for and returns a Responder ComPoint when a message arrives.
-
close()
- Closes the ComPointHTTP.
-
comPoint(int, ComPointAddress)
- Creats an Initiator or Server ComPointHTTP cast into ComPoint.
-
finalize()
- Finalizer.
-
getProtocol()
- Returns the protocol.
-
init()
- Initializes the module.
-
isInitialized()
- Check whether the module is initialized.
-
isProxyConfigured()
- Check whether a proxy is configured.
-
read()
- Waits for and returns a message received on the ComPoint, which
must be either an Initiator or a Responder.
-
write(Object)
- Sends the message through the ComPoint, which must be either
an Initiator or a Responder.
ComPointHTTP
public ComPointHTTP()
- Creats a ComPointHTTP.
ComPointHTTP
public ComPointHTTP(int type,
ComPointAddress address) throws ComPointException
- Creats an initiator or server ComPointHTTP.
- Parameters:
- type - type of ComPointHTTP to be created, initiator or server
- address - if the type is server, the local address; otherwise,
the remote address.
- Throws: ComPointException
- if type is invalid or
the socket cannot be opened.
init
public static void init()
- Initializes the module.
isInitialized
public static boolean isInitialized()
- Check whether the module is initialized.
- Returns:
- true if and only if fully initialized;
isProxyConfigured
public static boolean isProxyConfigured()
- Check whether a proxy is configured.
- Returns:
- true if and only if a proxy configured;
comPoint
public ComPoint comPoint(int type,
ComPointAddress address) throws ComPointException
- Creats an Initiator or Server ComPointHTTP cast into ComPoint.
- Parameters:
- type - type of ComPointHTTP to be created
- address - if the type is server, the local address; otherwise,
the remote address.
- Throws: ComPointException
- if type is invalid or
the socket cannot be opened.
- Overrides:
- comPoint in class ComPointTCP
close
public void close() throws ComPointException
- Closes the ComPointHTTP.
- Throws: ComPointException
- if type is invalid or encountered
an error while error while closing the socket.
- Overrides:
- close in class ComPointTCP
finalize
protected void finalize()
- Finalizer.
- Overrides:
- finalize in class ComPointTCP
getProtocol
public String getProtocol()
- Returns the protocol.
- Overrides:
- getProtocol in class ComPointTCP
write
public synchronized void write(Object message) throws ComPointException
- Sends the message through the ComPoint, which must be either
an Initiator or a Responder.
- Parameters:
- message - message to be sent.
- Throws: ComPointException
- if the type is invalid or encountered
an error while externalizing the message.
- Overrides:
- write in class ComPointTCP
read
public synchronized Object read() throws ComPointException
- Waits for and returns a message received on the ComPoint, which
must be either an Initiator or a Responder.
- Throws: ComPointException
- if the ComPoint type or HTTP type is
invalid or encountered an error while internalizing the message.
- Overrides:
- read in class ComPointTCP
accept
public synchronized ComPoint accept() throws ComPointException
- Waits for and returns a Responder ComPoint when a message arrives.
Must be invoked on a ComPoint of type Server.
- Throws: ComPointException
- if the type is invalid or encountered
an error while accepting a new socket.
- Overrides:
- accept in class ComPointTCP
All Packages Class Hierarchy This Package Previous Next Index