org.fosstrak.ale.server
Class Subscriber

java.lang.Object
  extended by org.fosstrak.ale.server.Subscriber

public class Subscriber
extends java.lang.Object

This class represents a subscriber of an ec specification. There are three types of such subscribers: http, tcp, file This class parses and validates the notification url, formats the ec reports and notifies the subscriber.

Author:
regli

Constructor Summary
Subscriber(java.lang.String notificationURI)
          Constructor parses and validates the notification uri and creates the corresponding subscriber.
 
Method Summary
 java.lang.String getHost()
          This method returns the host name of this subscriber.
 java.lang.String getPath()
          This method returns the path of this subscriber.
 int getPort()
          This method returns the port number of this subscriber.
 java.lang.String getURI()
          This metod returns the notification uri of this subscriber.
 boolean isFile()
          This method indicates if this subscriber uses the file protocol.
 boolean isHttp()
          This method indicates if this subscriber uses the http protocol.
 boolean isTcp()
          This method indicates if this subscriber uses the tcp protocol.
 void notify(org.fosstrak.ale.xsd.ale.epcglobal.ECReports reports)
          This method notifies the subscriber about the ec reports.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Subscriber

public Subscriber(java.lang.String notificationURI)
           throws org.fosstrak.ale.wsdl.ale.epcglobal.InvalidURIExceptionResponse
Constructor parses and validates the notification uri and creates the corresponding subscriber.

Parameters:
notificationURI - of the subscriber
Throws:
org.fosstrak.ale.wsdl.ale.epcglobal.InvalidURIException - if the notification uri is invalid
org.fosstrak.ale.wsdl.ale.epcglobal.InvalidURIExceptionResponse
Method Detail

getURI

public java.lang.String getURI()
This metod returns the notification uri of this subscriber.

Returns:
notification uri

isHttp

public boolean isHttp()
This method indicates if this subscriber uses the http protocol.

Returns:
true if this subscriber uses the http protocol and false otherwise

isTcp

public boolean isTcp()
This method indicates if this subscriber uses the tcp protocol.

Returns:
true if this subscriber uses the tcp protocol and false otherwise

isFile

public boolean isFile()
This method indicates if this subscriber uses the file protocol.

Returns:
true if this subscriber uses the file protocol and false otherwise

getHost

public java.lang.String getHost()
This method returns the host name of this subscriber.

Returns:
host name

getPort

public int getPort()
This method returns the port number of this subscriber.

Returns:
port number

getPath

public java.lang.String getPath()
This method returns the path of this subscriber.

Returns:
path

notify

public void notify(org.fosstrak.ale.xsd.ale.epcglobal.ECReports reports)
            throws org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse
This method notifies the subscriber about the ec reports.

Parameters:
reports - to notify the subscriber about
Throws:
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationException - if an implementation exception occures
org.fosstrak.ale.wsdl.ale.epcglobal.ImplementationExceptionResponse


Copyright © 2009. All Rights Reserved.