de.fhhannover.inform.trust.ifmapj.channel
Class ArcImpl

java.lang.Object
  extended by de.fhhannover.inform.trust.ifmapj.channel.ArcImpl
All Implemented Interfaces:
ARC, IfmapChannel

public class ArcImpl
extends Object
implements ARC

Implementation of ARC

Author:
aw

Field Summary
static String VERIFY_PEER_CERT_PROPERTY
           
static String VERIFY_PEER_HOST_PROPERTY
           
 
Method Summary
 void closeTcpConnection()
          Closes the underlying TCP connection.
 Result genericRequest(Request req)
          Generic Request Interface
 Result genericRequestWithSessionId(Request req)
           
 Integer getMaxPollResSize()
           
 String getPassword()
           
 String getPublisherId()
           
 String getSessionId()
           
 String getUrl()
           
 String getUser()
           
 boolean isBasicAuth()
           
 PollResult poll()
          Send a poll on the ARC.
 void setGzip(boolean useGzip)
          Specifies whether GZIP compression should be used.
 void setMaxPollResSize(Integer mprs)
          Set the max-poll-result-size for this channel.
 void setPublisherId(String publisherId)
          Set the ifmap-publisher-id for this channel.
 void setSessionId(String sessionId)
          Set the session-id to be used for this channel.
 boolean usesGzip()
          Indicates whether GZIP compression is used by this channel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.fhhannover.inform.trust.ifmapj.channel.IfmapChannel
closeTcpConnection, genericRequest, genericRequestWithSessionId, setGzip, usesGzip
 

Field Detail

VERIFY_PEER_CERT_PROPERTY

public static final String VERIFY_PEER_CERT_PROPERTY
See Also:
Constant Field Values

VERIFY_PEER_HOST_PROPERTY

public static final String VERIFY_PEER_HOST_PROPERTY
See Also:
Constant Field Values
Method Detail

poll

public PollResult poll()
                throws IfmapErrorResult,
                       EndSessionException,
                       IfmapException
Description copied from interface: ARC
Send a poll on the ARC. This is a blocking method that returns when the poll results from the MAPS have been received.

Specified by:
poll in interface ARC
Returns:
the poll results that have been received from the MAPS
Throws:
IfmapErrorResult
EndSessionException
IfmapException

getSessionId

public String getSessionId()
Specified by:
getSessionId in interface IfmapChannel
Returns:
the current session-id for this channel, either set by a call to SSRC.newSession() or IfmapChannel.setSessionId(String), or null if none of these calls was made.

getPublisherId

public String getPublisherId()
Specified by:
getPublisherId in interface IfmapChannel
Returns:
the current ifmap-publisher-id for this channel, either set by a call to SSRC.newSession() or IfmapChannel.setPublisherId(String), or null if none of these calls was made.

getMaxPollResSize

public Integer getMaxPollResSize()
Specified by:
getMaxPollResSize in interface IfmapChannel
Returns:
the current max-poll-result-size for this channel, either set by a call to SSRC.newSession() or IfmapChannel.setMaxPollResSize(Integer), or null if none of these calls was made.

setSessionId

public void setSessionId(String sessionId)
Description copied from interface: IfmapChannel
Set the session-id to be used for this channel. Be aware, calling this on an ARC will change the SSRC object attached to the ARC. Calling it on an SSRC will also change the attached ARC objects for the SSRC.

Specified by:
setSessionId in interface IfmapChannel

setPublisherId

public void setPublisherId(String publisherId)
Description copied from interface: IfmapChannel
Set the ifmap-publisher-id for this channel. Be aware, calling this on an ARC will change the SSRC object attached to the ARC. Calling it on an SSRC will also change the attached ARC objects for the SSRC. This call will only result in having IfmapChannel.getPublisherId() return the set value. Requests won't be influenced.

Specified by:
setPublisherId in interface IfmapChannel

setMaxPollResSize

public void setMaxPollResSize(Integer mprs)
Description copied from interface: IfmapChannel
Set the max-poll-result-size for this channel. Be aware, calling this on an ARC will change the SSRC object attached to the ARC. Calling it on an SSRC will also change the attached ARC objects for the SSRC. This call will only result in having IfmapChannel.getMaxPollResSize() return the set value. Requests won't be influenced.

Specified by:
setMaxPollResSize in interface IfmapChannel

genericRequestWithSessionId

public final Result genericRequestWithSessionId(Request req)
                                         throws IfmapErrorResult,
                                                IfmapException
Specified by:
genericRequestWithSessionId in interface IfmapChannel
Throws:
IfmapErrorResult
IfmapException

genericRequest

public final Result genericRequest(Request req)
                            throws IfmapErrorResult,
                                   IfmapException
Description copied from interface: IfmapChannel
Generic Request Interface

Specified by:
genericRequest in interface IfmapChannel
Returns:
Throws:
IfmapErrorResult
IfmapException

getUrl

public String getUrl()

getUser

public String getUser()

getPassword

public String getPassword()

setGzip

public void setGzip(boolean useGzip)
Description copied from interface: IfmapChannel
Specifies whether GZIP compression should be used.

Specified by:
setGzip in interface IfmapChannel
Parameters:
useGzip - true if GZIP should be used

usesGzip

public boolean usesGzip()
Description copied from interface: IfmapChannel
Indicates whether GZIP compression is used by this channel

Specified by:
usesGzip in interface IfmapChannel
Returns:
true, if GZIP is used

isBasicAuth

public boolean isBasicAuth()
Returns:
whether the channel uses basic authentication

closeTcpConnection

public void closeTcpConnection()
                        throws CommunicationException
Description copied from interface: IfmapChannel
Closes the underlying TCP connection.

Specified by:
closeTcpConnection in interface IfmapChannel
Throws:
CommunicationException


Copyright © 2012 Trust@FHH. All Rights Reserved.